<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">

    function fun1() {
        // 允许输入的提示框
        var name = prompt("姓名:");
        document.write(name)
    }
    fun1()

    function fun2() {
        var flag = confirm("确定删除?")
        if (flag) {
            alert('删除成功')
        }else {
            alert('删除失败')
        }
    }
    fun2()

</script>
</body>
</html>